﻿using MiniFox.Infrastructure;
using MiniFox.Infrastructure.Attributes;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Repository.Core.Models.VO
{
    [JsonObject]
    public class VersionItemVo
    {
        [Key]
        [JsonProperty("versionId")]
        public long VersionID { get; set; }
        [Display(Name = "名称", ShortName = "名称")]
        [JsonProperty("name")]
        public string VersionSetName { get; set; }

        [JsonProperty("authorId")]
        public string AuthorID { get; set; }

        [Display(Name = "编辑人", ShortName = "编辑人")]
        [JsonProperty("authorName")]
        public string AuthorName { get; set; }

        [Display(Name = "创建时间", ShortName = "创建时间")]
        [JsonProperty("versionTime")]
        public DateTime VersionTime { get; set; }

        [Display(Name = "版本备注", ShortName = "版本备注")]
        [JsonProperty("comment")]
        public string Comment { get; set; }

        [JsonProperty("published")]
        public bool Published { get; set; }

        [Display(Name = "操作", ShortName = "操作")]
        [JsonProperty("operationType"), JsonConverter(typeof(StringEnumConverter))]
        public VersionOperationType OperationType { get; set; }
    }

}
